const Koa = require('koa')
const { serverPluginServeStatic } = require('./serve/serverPluginServeStatic')
function crrateServer () {
    const app = new Koa()
    const root = process.cwd() // 当前根的位置
    // console.log(root);
    const context = {
      app,
      root
    }
    const resolvePlugins = [
      // 1. 实现静态服务功能
      serverPluginServeStatic
    ]
    resolvePlugins.forEach(pulgin => pulgin(context))
    return app
}

module.exports = crrateServer